package com.zzz.poker.properties;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.context.properties.bind.DefaultValue;
import org.springframework.context.annotation.Configuration;

/**
 * @BelongsProject: share
 * @BelongsPackage: com.zzz.poker.properties
 * @Author: zwq
 * @CreateTime: 2025-05-26  23:58
 * @Description: TODO
 * @Version: 1.0
 */
@Configuration
@ConfigurationProperties(prefix = "websocket")
@Data
public class WebSocketProperties {
    private int port = 8081; // 默认端口
    private String path = "/ws"; // WebSocket 路径
    private int bossThreads = 1; // boss 线程数
    private int workerThreads = 0; // worker 线程数, 0 表示 Netty 默认值(CPU核心数*2)
    private boolean soKeepalive = true; // 开启 TCP keepalive
    private int soBacklog = 128; // 连接队列大小
    private long readerIdleTime = 60; // 读空闲时间(秒)
    private long writerIdleTime = 0; // 写空闲时间(秒)
    private long allIdleTime = 0; // 读写空闲时间(秒)
    private int maxFrameSize = 65536; // 最大帧大小


}
